09. Is Self Important?

Is Self Important?

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

Correction: self is not a Python keyword. We made a mistake in calling it so. If you change all occurrences of the word "self" to another word, say "udacity" in the media.py file, the code will still work. Go ahead, try it out.

Even though self is not a keyword, it is a convention that is used by most Python programmers. Using the word self will make your code more readable to other programmers. So we encourage that you do so.

Check out section 9.4 of the Python documentation for more information. A big thank you to our student Michael Handel for catching this error.